<html>
    <body>
        <script>
            console.log(Number(null),Number(undefined));
            console.log(!!"",!!1,!!undefined);
            var  msg = "hello var1";
            function test(){
                var msg="hello var2";
                console.log(msg);
            }
            test();
            console.log(msg);

            function test2(){
                var x="hello";
                var z=x+" "+y;
                console.log(z);
                var y = "js";
            }
            test2();

            console.log(Boolean(""),typeof Boolean(""));
            console.log(Boolean(1),typeof Boolean(1));
            console.log(Boolean(NaN),typeof Boolean(NaN));
            console.log(Boolean("false"),typeof Boolean("false"));
            console.log(Boolean(null),typeof Boolean(null));
            console.log(Boolean(undefined),typeof Boolean(undefined));

            console.log("Number")

            console.log(Number(true))   //1
            console.log(Number(null))   //0
            console.log(Number(undefined))  //NaN
            console.log(Number("0xff"))     //255
            console.log(Number(""))    // 0

            console.log("String")
            console.log(String(1024));  //1024
            console.log(String(null));  //null
            console.log(String(NaN));   //NaN



            var person = {fname:"john", lname:"Doe", age:21};
            var i=0;
            var j=0;
            for(i in person){
                document.write(person[i]+" ");
            }
           

            let arr = [1,2,3,4,5,6,7,8,9];
            for(let num of arr){
                if(num%2==0){
                    continue;
                }else{
                    console.log(num);
                }
            }
        </script>
    </body>
</html>